package com.boatAnchorAssistant.service.repository.in;

import com.boatAnchorAssistant.pojo.dto.role.UserRoleDto;
import com.boatAnchorAssistant.pojo.dto.userDataDictionary.UserDataDictionaryDto;
import com.boatAnchorAssistant.pojo.entity.DataDictionary;
import com.boatAnchorAssistant.pojo.entity.UserDataDictionary;
import nirvana.core.repository.IRepository;
    import com.boatAnchorAssistant.pojo.dto.userDataDictionary.SelectUserDataDictionaryDto;
    import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;

/**
* 【描 述】：
* 【环 境】：J2SE
* 【详 细】：
*
*/
public interface UserDataDictionaryRepository extends IRepository< UserDataDictionary > {


    /**
    * 搜索用户数据字典关联表
    * @param dto
    * @return
    */
    Page< UserDataDictionary > selectUserDataDictionary(SelectUserDataDictionaryDto dto);

    /**
    * 获取Map
    * @param ids
    * @return
    */
    Map<Long, UserDataDictionary> getMap(List<Long> ids);

    /**
     * 根据类型和用户id查询用户所关联的数据字典的id
     * @param userId
     * @return
     */
    List<Long> selectByUserIdAndTypeId(Long typeId, Long userId);

    /**
     * 批量获取用户下的区域
     * @param userIds
     * @return
     */
    Map<Long, List<UserDataDictionaryDto>> getListByUserIds(List<Long> userIds, Long typeId);
}